home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / drdobbs / 1991 / 04 / oliver / leaf.h < prev    next >
Text File  |  1991-01-23  |  2KB  |  48 lines

  1. /*   LEAF.H ---     Header file for maple leaf template
  2.      This (and the other header files like it) can be used to define
  3.      the initial fractal template for the SIERP.C and FRACDRAW.C programs
  4.      This is the "geometric genetic code" for a maple leaf.  Note the close
  5.      similarity to the MAPLE tree template.
  6. */
  7. #define NPOINTS 4    /* Number of points on the "parent" polygon */
  8. #define NTRANS  4    /* Number of transformed "children" */
  9. #define NLEVELS 6    /* Number of levels to draw */
  10. #define COUNT 10000  /* Number of dots to paint */
  11. #define CENTERX 320  /* Center of the screen */
  12. #define CENTERY 350
  13. #define SEEDX 6,20,-6,-12  /* The "parent" polygon */
  14. #define SEEDY -120,120,120,-120
  15.  
  16. /* The tranformations which define the "children" */
  17. #define MOVEX -1.15,-53,51,-6  /* Displacement */
  18. #define MOVEY 35,7,6,-111
  19. #define SIZEX  0.14,0.62,0.65,0.49 /* Size change */
  20. #define SIZEY  0.51,0.72,0.68,0.51
  21. #define SPINX  6.26,5.47,0.81,6.28 /* Rotation */
  22. #define SPINY  6.26,5.47,0.81,6.28
  23.  
  24. /* The following color definitions are ignored by the SIERP program
  25.    and used only by FRACDRAW.
  26.    PALETTE defines the 16-color VGA palette
  27.    COLOR intializes a two-dimensional array with color values:
  28.    each column in the array definition below corresponds to one level
  29.    of detail, and each row corresponds to a "part", or transformation.
  30.    Note that the array only needs to be 6 by 3 for the template defined
  31.    above, but more rows are included in case the user inserts additional
  32.    "parts".
  33. */
  34. #define PALETTE {_BLACK, _RED, _GREEN, _CYAN, \
  35.          _BLUE, _MAGENTA, _BROWN, _WHITE, \
  36.          _GRAY, _LIGHTBLUE, _LIGHTGREEN, _LIGHTCYAN, \
  37.          _LIGHTRED, _LIGHTMAGENTA, _LIGHTYELLOW, _BRIGHTWHITE}
  38.  
  39. #define COLOR {{6, 6,14,14,10, 2},\
  40.                {6, 6,14,14,10, 2},\
  41.                {6, 6,14,14,10, 2},\
  42.                {6, 6,14,14,10, 2},\
  43.                {6, 6,14,14,10, 2},\
  44.                {6, 6,14,14,10, 2},\
  45.                {6, 6,14,14,10, 2},\
  46.                {6, 6,14,14,10, 2},\
  47.                {6, 6,14,14,10, 2}}
  48.